Traditionally, in an electronic device having a distance measuring function, a distance measuring method called as a Time of Flight (ToF) method has been frequently used. In the ToF method, a device irradiates an object with intermittent light such as a sine wave or a rectangular wave, receives reflected light with respect to the irradiation light, and measures a distance from a phase difference between the irradiation light and the reflected light.
In the ToF method, if the reflected light is received by a ToF sensor in which a plurality of pixels is arranged in an array, the device can measure a distance for each pixel and generate a depth map. To improve an image quality of the depth map, a system to which a solid-state imaging device for receiving continuous light, not the intermittent light, and images image data is added has been proposed (for example, refer to Non-Patent Document 1). In this system, the received light data of the ToF sensor and the image data imaged by the solid-state imaging device are input to a cross-bilateral filter to generate the depth map. The cross-bilateral filter is a filter using a Gaussian function and is used for noise removal, upsampling, and the like.